package com.zr.action;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.zr.dao.impl.Zltypedaoimpl;

import net.sf.json.JSONArray;

public class ZLtypeaction extends HttpServlet{
	@Override
	protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
		// TODO Auto-generated method stub
		doPost(req, resp);
	}
	@Override
	protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
		//返回知识列表下拉数据
		resp.setCharacterEncoding("utf8");
		JSONArray jsons = new JSONArray();
		Zltypedaoimpl zl = new Zltypedaoimpl();
		jsons =zl.typeselect(); 
		PrintWriter pw = resp.getWriter();
		pw.write(jsons.toString());
		
	}

}
